//
//  UserModel.m
//  FMJY
//
//  Created by 汪高明 on 2017/5/27.
//  Copyright © 2017年 随心. All rights reserved.
//

#import "UserModel.h"

@implementation UserModel

-(void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.userId forKey:@"userId"];
    [aCoder encodeObject:self.userNm forKey:@"userNm"];
    [aCoder encodeObject:self.appHotVersion forKey:@"appHotVersion"];
    [aCoder encodeObject:self.userNick forKey:@"userNick"];
    [aCoder encodeObject:self.tokenTime forKey:@"tokenTime"];
    [aCoder encodeObject:self.loginToken forKey:@"loginToken"];
    [aCoder encodeObject:self.tokenExpire forKey:@"tokenExpire"];
    [aCoder encodeObject:self.dealerId forKey:@"dealerId"];
    [aCoder encodeObject:self.isDealer forKey:@"isDealer"];
}

- (instancetype)initWithCoder:(NSCoder *)coder
{
    self = [super init];
    if (self) {
        self.userId = [coder decodeObjectForKey:@"userId"];
        self.userNm = [coder decodeObjectForKey:@"userNm"];
        self.appHotVersion = [coder decodeObjectForKey:@"appHotVersion"];
        self.userNick = [coder decodeObjectForKey:@"userNick"];
        self.tokenTime = [coder decodeObjectForKey:@"tokenTime"];
        self.loginToken = [coder decodeObjectForKey:@"loginToken"];
        self.tokenExpire = [coder decodeObjectForKey:@"tokenExpire"];
        self.dealerId = [coder decodeObjectForKey:@"dealerId"];
        self.isDealer = [coder decodeObjectForKey:@"isDealer"];
    }
    return self;
}

@end
